const Author_key = "use"

//设置token
function setAuthor(value) {
  window.localStorage.setItem(Author_key, JSON.stringify(value))
}
//获取
function getAuthor() {
  return window.localStorage.getItem(Author_key)
    ? JSON.parse(window.localStorage.getItem(Author_key))
    : null
}
//删除
function removeAuthor() {
  window.localStorage.removeItem(Author_key)
}

export { setAuthor, getAuthor, removeAuthor }
